package com.pan.admin.module.loanProduct.dao;

import com.pan.admin.module.loanProduct.entity.po.LoanProductPlanFilterChannelPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 机构计划屏蔽渠道
 *
 * @author pan
 */
@Mapper
public interface LoanProductPlanFilterChannelDao {

    /**
     *  根据机构计划id获取屏蔽项
     *
     *  @param   loanProductPlanId   机构计划主键id
     *  @return  List
     */
    List<LoanProductPlanFilterChannelPO> list(@Param("loanProductId") Long loanProductId, @Param("loanProductPlanId") Long loanProductPlanId);

    /**
     *  批量新增屏蔽项根据计划id
     *
     *  @param   list   机构计划主键id
     *  @return  List
     */
    int batchInsertByProductPlanId(List<LoanProductPlanFilterChannelPO> list);

    /**
     *  根据机构计划id删除所有屏蔽项
     *
     *  @param   loanProductPlanId   机构计划主键id
     *  @return  List
     */
    int deleteByProductPlanId(Long loanProductPlanId);

}
